home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 5 / Amoszine 5.adf / arts / HowDoTheyDoThat.asc.cm / HowDoTheyDoThat.asc.cm
Text File  |  1992-02-26  |  6KB  |  144 lines

  1. @2
  2.                          HOW DO THEY DO THAT?
  3.  
  4.                                   by
  5.  
  6.                               PAUL OVERY
  7.  
  8. @1
  9. I've only had three "how's" this issue, so come on I want to see those
  10. questions piling in.  All manner of programming techniques are covered
  11. in this article but@7 we need you the reader to take part.@1
  12.  
  13. If you want to take part then write to the address at the end of this
  14. article.
  15.  
  16. @2
  17. From fellow music editor Mike Richmond we have:-
  18.  
  19. Question:
  20.  
  21. "Why don't you do one for the A.I. routines on Sensi Soccer?"
  22. @3
  23.  
  24.  
  25. Answer:
  26.  
  27. Before we begin I think it's important to ask the question.
  28.  
  29. What is Artificial Intelligence?
  30.  
  31. As far I am are I'm aware there are two main thoughts on A.I.
  32. The first for example a computer which learns as it develops, and can
  33. carry out its own actions that it was never programmed for in the
  34. first place.  With time it would be able to handle almost any
  35. situation.
  36.  
  37. The second thought on A.I. is where the computer stores all the
  38. possible answers to a problem.  So its a simple case of looking up the
  39. correct answer in memory to match the problem.
  40.  
  41. Both of these techniques  can be defined as A.I., as we still do not
  42. fully undersand our own human thoughts which is what A.I. is based on.
  43.  
  44. Both  of the above methods have their strong and week points.
  45. i.e. The thinking method is slow, where the lookup method is extremely
  46. fast. The Look up method uses vast amounts of storage space, where as
  47. the thinking method uses only a minimal amount.
  48. @3
  49. In the case of Sensible Soccer it is my opinion that they have used
  50. none of the above methods, therefore it can not be classed as A.I.
  51.  
  52. It would seem that the way the game plays, a specific game engine has
  53. been written to handle this football problem.
  54.  
  55. Although they may have used small lookup tables, these can not be
  56. seen in the same light as the A.I. method as described above, small
  57. look up tables would have been used for storing mathematical
  58. calculations for obtaining fast angles between two points. This would
  59. allow the computer controlled players to "home-in" on the ball using
  60. hardly any computation time.
  61.  
  62. That's all the game basically does, the CPU player closest to the ball
  63. runs straight for it using lookups, while the other CPU players follow
  64. in his direction at the correct distances for support.  Again each CPU
  65. player can have a separate lookup table for each type of attack or
  66. defence skill and so on. I gave an example of how to do this in AZ#4
  67. (the last issue) find it in "Paul_Overy's_code / Find_angle.amos".
  68.  
  69. All of this, has of course been guess work.  But I don't see any
  70. problems in using this type of method.  For example - Even if the CPU
  71. player has the ball he can dodge to opposition by just using lookup
  72. tables, complex time-consuming calculations need never be used.
  73. @3
  74. e.g.  Imagine an invisible grid over each player made up of avoiding
  75. direction arrows. So when the attacker moves in close, his grid can be
  76. read, and ovoiding action taken.  Anyone who has used my High Octane
  77. Map Editor may have a better idea of what I on about.
  78.  
  79. The whole footbale game could be controlled by nothing but lookup
  80. tables. Pre-calculated decisions brake up into all the differnet rules
  81. of the game, but this must not be confused with A.I.
  82.  
  83. Now that we are on the subject of Sensible Soccer, I can tell you that
  84. they re-use the same sprites within the same display field.
  85. Sprites are longer than need be so they can be cut up and displayed in
  86. different horizontal positions, working down the screen.  This results
  87. in many extra sprites being displayed, but at least one video line
  88. must separate them. No more than 8 sprites can be placed on each
  89. horizontal line because there are only 8 hardware sprites.  If in such
  90. a case an extra sprite cannot be generated on the screen then the
  91. blitter will take over to generate a bob. This Blitter OBject is
  92. replaced by a sprite as soon a possible.  Using this simple sprite
  93. update method, the best possible sprite usage can always be made.
  94. Freeing up much needed CPU time.
  95.  
  96. @2
  97. The second question was from Andy Dobinson, Amoszines information man.
  98. This question was over the telephone - I as far as I can remember it
  99. went something like this:
  100.  
  101. Question:
  102.  
  103. "Oh great one, forgive my stupidity but... How do Team17 do that
  104. Tunnel effect in Super Stardust?"
  105. @4
  106. Answer:
  107.  
  108. Simple, they just hold one 1/4 of the Tunnel gfx in memory and flip
  109. it on each of the axis to achieve a full screen effect.  This way a
  110. full Tunnel animimation can be held memory, as holding a full screen
  111. animation could not be possible even with two megs - other sound & gfx
  112. must fit in to. Then its just a simple matter of using the A1200's 16
  113. colour dual playfield and a bit of screen offsetting whenever the
  114. space ship moves.  The larger and more colourful sprites that the
  115. newer Amiga has to offer also helps greatly. (All you A500 users hurry
  116. up and die before we all do!)
  117.  
  118. This game would be hard to pull off on even a fast IBM-PC, as for a
  119. fast 386 - forget it!
  120. @1
  121. Also while I'm on the subject of PC's, how about Intel's Pentium chip.
  122. There is a rather nasty fault in the floating point unit, which gives
  123. errors on floats carried out in certain ways.  Intel have of course
  124. kept their heads low over this - they don't tell you about it in their
  125. "Intel Inside" adverts that plague our TV's), this type of fault
  126. should never appear with todays quality assurance procedures.  The
  127. fault was found when someone was using a windows WP, Ha!
  128.  
  129. @2My third question is from fellow FRYUP geezer PAUL COTTAGE.
  130.  
  131. Question:   "Mr Overy how do you pull so many birds?"
  132. @3Answer:
  133. "Well you see Mr Cottage it's because I use AMOS, and its a guaranteed
  134. pull when they see my extensions!!!!"
  135. @1
  136. If you would like the basis of a game explained then write to:-
  137.                             Paul Overy
  138.                             27 Barton Road
  139.                             Maidstone
  140.                             Kent
  141.                             ME15 7BU
  142.                             England
  143. Hopefully your answer will be in the next issue of the Amoszine.
  144.